package com.itheima.job;

import com.itheima.service.db.AnalysisByDayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @Author 请不要叫我高司令
 * @Date 2022/3/26 20:51
 * @Version 1.0
 */

@Component
public class AnalysisJob {

    @Autowired
    private AnalysisByDayService analysisByDayService;

    // @Scheduled(cron = "0 0 0/1 * * ?") 间隔一消息
    @Scheduled(cron = "0/30 * * * * ?")
    public void logToAnalysisByDay() {

        System.out.println("日志同步start...");
        analysisByDayService.logToAnalysisByDay();
        System.out.println("日志同步end...");

    }




}
